﻿namespace SLClient.ServiceAPI
{
    using System;
    using System.CodeDom.Compiler;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Runtime.Serialization;
    using System.Threading;

    [DataContract(Name="PlayTypeInfo", Namespace="http://schemas.datacontract.org/2004/07/SLClient"), DebuggerStepThrough, GeneratedCode("System.Runtime.Serialization", "4.0.0.0")]
    public class PlayTypeInfo : INotifyPropertyChanged
    {
        private bool CanUserChangeField;
        private decimal JiangJinField;
        private int PlayInfoIdField;
        private string PlayInfoNameField;
        private int PlayTypeIdField;
        private PropertyChangedEventHandler _PropertyChanged;
        private decimal ScaleBaseField;

        public event PropertyChangedEventHandler PropertyChanged
        {
            add
            {
                PropertyChangedEventHandler handler2;
                PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
                do
                {
                    handler2 = propertyChanged;
                    PropertyChangedEventHandler handler3 = (PropertyChangedEventHandler) Delegate.Combine(handler2, value);
                    propertyChanged = Interlocked.CompareExchange<PropertyChangedEventHandler>(ref this._PropertyChanged, handler3, handler2);
                }
                while (propertyChanged != handler2);
            }
            remove
            {
                PropertyChangedEventHandler handler2;
                PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
                do
                {
                    handler2 = propertyChanged;
                    PropertyChangedEventHandler handler3 = (PropertyChangedEventHandler) Delegate.Remove(handler2, value);
                    propertyChanged = Interlocked.CompareExchange<PropertyChangedEventHandler>(ref this._PropertyChanged, handler3, handler2);
                }
                while (propertyChanged != handler2);
            }
        }

        protected void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler propertyChanged = this._PropertyChanged;
            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        [DataMember(Order=3)]
        public bool CanUserChange
        {
            get
            {
                return this.CanUserChangeField;
            }
            set
            {
                if (!this.CanUserChangeField.Equals(value))
                {
                    this.CanUserChangeField = value;
                    this.RaisePropertyChanged("CanUserChange");
                }
            }
        }

        [DataMember(Order=2)]
        public decimal JiangJin
        {
            get
            {
                return this.JiangJinField;
            }
            set
            {
                if (!this.JiangJinField.Equals(value))
                {
                    this.JiangJinField = value;
                    this.RaisePropertyChanged("JiangJin");
                }
            }
        }

        [DataMember]
        public int PlayInfoId
        {
            get
            {
                return this.PlayInfoIdField;
            }
            set
            {
                if (!this.PlayInfoIdField.Equals(value))
                {
                    this.PlayInfoIdField = value;
                    this.RaisePropertyChanged("PlayInfoId");
                }
            }
        }

        [DataMember]
        public string PlayInfoName
        {
            get
            {
                return this.PlayInfoNameField;
            }
            set
            {
                if (!object.ReferenceEquals(this.PlayInfoNameField, value))
                {
                    this.PlayInfoNameField = value;
                    this.RaisePropertyChanged("PlayInfoName");
                }
            }
        }

        [DataMember(Order=5)]
        public int PlayTypeId
        {
            get
            {
                return this.PlayTypeIdField;
            }
            set
            {
                if (!this.PlayTypeIdField.Equals(value))
                {
                    this.PlayTypeIdField = value;
                    this.RaisePropertyChanged("PlayTypeId");
                }
            }
        }

        [DataMember(Order=4)]
        public decimal ScaleBase
        {
            get
            {
                return this.ScaleBaseField;
            }
            set
            {
                if (!this.ScaleBaseField.Equals(value))
                {
                    this.ScaleBaseField = value;
                    this.RaisePropertyChanged("ScaleBase");
                }
            }
        }
    }
}

